home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / fplib20 / math.h < prev    next >
C/C++ Source or Header  |  1990-11-23  |  985b  |  39 lines

  1. /*
  2.  *    MATH.H        Math function declarations
  3.  */
  4.  
  5. #ifndef MATH_H
  6. #define    MATH_H
  7.  
  8. extern    float    sin(), cos(), tan();
  9. extern    float    asin(), acos(), atan(), atan2();
  10. extern    float    exp(), sinh(), cosh(), tanh();
  11. extern    float    log(), log10(), pow();
  12. extern    float    sqrt();
  13. extern    float    ceil(), floor(), fabs();
  14. extern    float    ldexp(), frexp(), modf(), fmod();
  15. extern    float    atof();
  16.  
  17. /* Some useful constants, generally to 8-9 digits */
  18.  
  19. #define M_E    2.71828183
  20. #define M_LOG2E    1.44269504
  21. #define M_LOG10E    0.43429448
  22. #define M_LN2    0.69314718
  23. #define M_LN10    2.30258509
  24. #define M_PI    3.14159265
  25. #define M_PI_2    1.570796327
  26. #define M_PI_4    0.785398163
  27. #define M_1_PI    0.318309886
  28. #define M_2_PI    0.636619772
  29. #define M_2_SQRTPI    1.128379167
  30. #define M_SQRT2    1.41421356
  31. #define M_SQRT1_2    0.70710678
  32. /* This is what the compiler should turn into 0xFFFFFF7F... */
  33. #define MAXFLOAT    ((float)9.2233715e+18)
  34. #define HUGE    MAXFLOAT
  35.  
  36. #define _ABS(x)    ((x) < 0 ? -(x) : (x))
  37.  
  38. #endif MATH_H
  39.